package com.xb.loan.cashier.service.constant;

/**
 * 收银台常量配置
 *
 */
public interface ICashierEnumConst {
	
	public final static String MSG = "msg";
    public final static String JSON = "json";
    public final static String FORM = "form";
    public final static String ENCODING = "encoding";
    public final static String ENCODING_GBK = "GBK";
    public final static String ENCODING_UTF8 = "UTF-8";
    public final static String PLAT_ID = "platId";
    public final static String STATUS = "status";
    public final static String CODE_URL = "codeUrl";
	
	/** 主键生成的策略*/
	public static enum CashierPriKeyStrategy{
	    CHARGE_ORDER("seq_charge_order" , 6),
	    CASHIER_PLAT("cashier_plat", 4),
	    CASHIER_PLATPAYTYPE("cashier_platpaytype", 4),
	    CASHIER_PAYCHANNEL("cashier_paychannel", 6),
	    ENCASH_ORDER("encashOrder" , 4);
	    
	    private String code;
	    private int num;
	    private CashierPriKeyStrategy(String code, int num) {
	        this.code = code;
	        this.num=num;
	    }
	    public String getCode() {return code;}
	    public void setCode(String code) {this.code = code;	}
	    public int getNum() {return num;}
	    public void setNum(int num) {this.num = num;	}	
	}
	
	/** 主键生成的策略*/
	public static enum TaskManagerCode{
        CHARGE_QUERY("CHARGE_QUERY" , "充值查询任务"),
        ENCASH_QUERY("ENCASH_QUERY" , "提现查询任务"),
        PUSH_CHARGE_RESULT("PUSH_CHARGE_RESULT" , "推送充值订单结果任务"),
        ACCTONT("ACCTONT" , "对账任务"),
        PUSH_ENCASH_RESULT("PUSH_ENCASH_RESULT" , "推送提现订单结果任务");
        private String code;
        private String msg;
        
        private TaskManagerCode(String code , String msg){
            this.code = code;
            this.msg = msg;
        }
        
        public String getCode() {
            return code;
        }
        public void setCode(String code) {
            this.code = code;
        }
        public String getMsg() {
            return msg;
        }
        public void setMsg(String msg) {
            this.msg = msg;
        }
    }
	
	/** 加密中间符号 */
	public static enum EncryptStrCentor {
		COMMON("&");
		private String code;

		private EncryptStrCentor(String code) {
			this.code = code;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}
	}
    
	/**
     * 
     * 收银台充值状态
     * @author siyuan.shi
     */
	public static enum CashierChargeStatus {
		WAIT(0, "待处理"), WAITING(1, "处理中"), SUCCESS(2, "成功"), FAIL(3, "失败");
		private int status;
		private String desc;

		private CashierChargeStatus(int status, String desc) {
			this.status = status;
			this.desc = desc;
		}

		public int getStatus() {
			return status;
		}

		public void setStatus(int status) {
			this.status = status;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
	}
	
	 /**
     * 
     * 收银台充值通知状态
     * @author siyuan.shi
     */
	public static enum CashierChargeReturnStatus {
		SUCCESS(1, "成功"), FAIL(2, "失败");
		private int status;
		private String desc;

		private CashierChargeReturnStatus(int status, String desc) {
			this.status = status;
			this.desc = desc;
		}

		public int getStatus() {
			return status;
		}

		public void setStatus(int status) {
			this.status = status;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
	}
	
	/**收银台加密类型*/
	public static enum CashierEncryptType {
		MD5(0, "MD5"), RSA(1, "RSA");
		private int encryptType;
		private String desc;

		private CashierEncryptType(int encryptType, String desc) {
			this.encryptType = encryptType;
			this.desc = desc;
		}

		public int getEncryptType() {
			return encryptType;
		}

		public void setEncryptType(int encryptType) {
			this.encryptType = encryptType;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
	}
	
	/**
     * 第三方提现到账类型
     * @author siyuan.shi
     */
	public static enum CashierBankDelayType {
		T0(0, "T0", "当天到账"), T1(1, "T1", "隔天到账");
		private int deplayType;
		private String code;
		private String desc;

		private CashierBankDelayType(int deplayType, String code, String desc) {
			this.deplayType = deplayType;
			this.code = code;
			this.desc = desc;
		}

		public int getDeplayType() {
			return deplayType;
		}

		public void setDeplayType(int deplayType) {
			this.deplayType = deplayType;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}
	}
	
	/**
     * 收银台提现批次状态
     * @author siyuan.shi
     */
	public static enum CashierEncashBatchStatus {
		WAIT(0, "等待处理"), WAITING(1, "处理中"), SENDING(2, "已发送"), FINISH(3, "完成");
		private int status;
		private String desc;

		private CashierEncashBatchStatus(int status, String desc) {
			this.status = status;
			this.desc = desc;
		}

		public int getStatus() {
			return status;
		}

		public void setStatus(int status) {
			this.status = status;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
	}
	
	/**
     * 
     * 收银台提现状态
     * @author siyuan.shi
     */
	public static enum CashierEncashStatus {
		WAIT(0, "待处理"), WAITING(1, "处理中"), SUCCESS(2, "成功"), FAIL(3, "失败");
		private int status;
		private String desc;

		private CashierEncashStatus(int status, String desc) {
			this.status = status;
			this.desc = desc;
		}

		public int getStatus() {
			return status;
		}

		public void setStatus(int status) {
			this.status = status;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
	}
	
	/**
     * 收银台提现推送状态
     */
	public static enum CashierEncashSendStatus {
		NOTSEND(0, "未发送"), SENDED(1, "已发送"), SENDFAIL(2, "发送失败");
		private int status;
		private String desc;

		private CashierEncashSendStatus(int status, String desc) {
			this.status = status;
			this.desc = desc;
		}

		public int getStatus() {
			return status;
		}

		public void setStatus(int status) {
			this.status = status;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
	}
	
	/**
     * 收银台支付类型
     */
	public static enum CashierPayType {
		charge(0, "充值"), encash(1, "提现");
		private int code;
		private String desc;

		private CashierPayType(int code, String desc) {
			this.code = code;
			this.desc = desc;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}

		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}
	}
	
	/**
     * 
     * 收银台交易类型
     * @author siyuan.shi
     */
	public static enum CashierTradeType {
		WEB(1, "WEB" , "chargeByWeb"),WAP(2, "WAP" , "chargeByWap"),APP(3, "APP" , "chargeByApp");
		private int id;
		private String name;
		private String methodName;

		private CashierTradeType(int id, String name , String methodName) {
			this.id = id;
			this.name = name;
			this.methodName = methodName;
		}
		
		public static String getTradeTypeMethod(int type){
		    for(CashierTradeType tradeType : CashierTradeType.values()){
		        if(tradeType.getId() == type){
		            return tradeType.getMethodName();
		        }
		    }
		    return "";
		}
		
		public int getId() {
			return id;
		}
		public void setId(int id) {
			this.id = id;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
        public String getMethodName() {
            return methodName;
        }
        public void setMethodName(String methodName) {
            this.methodName = methodName;
        }
	}
	
	/**
     * 收银台充值推送状态
     */
    public static enum CashierChargeSendStatus {
        NOTSEND(0, "未发送"), SENDED(1, "已发送"), SENDFAIL(2, "发送失败");
        private int status;

        private String desc;

        private CashierChargeSendStatus(int status, String desc) {
            this.status = status;
            this.desc = desc;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }
	
    /** 收银第三方支付类型 **/
    public static enum CashierPayChannelType {
        ALIPAY(1, "alipay", "支付宝"), WECHATPAY(2, "wechat", "微信"), UNIONPAY(3, "unionpay", "银联"), BANKCOMM(4, "bankcomm", "交行");
        private int type;
        private String name;
        private String desc;

        private CashierPayChannelType(int type, String name, String desc) {
            this.type = type;
            this.desc = desc;
        }
        
        public static String getPayChannelName(int type){
            
            for(CashierPayChannelType channelType : CashierPayChannelType.values()){
                if(channelType.getType() == type){
                    return channelType.getDesc();
                }
            }
            
            return "";
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
	
	/**收银台订单类型 */
	public static enum CashierOrderType {
		charge(0), encash(1);
		private int code;

		private CashierOrderType(int code) {
			this.code = code;
		}

		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}
	}
	
    /**收银台与第三方对明细账状态**/
    public static enum CashierAccountDetailStatus {
        SUCCESS(1, "成功"), DETAIL_ERROR(2, "明细不一致"), THIRD_LESS_ERROR(3, "第三方少帐"), CASHIER_LESS_ERROR(4, "收银台少帐");
        private int status;

        private String desc;

        private CashierAccountDetailStatus(int status, String desc) {
            this.status = status;
            this.desc = desc;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public int getStatus() {
            return status;
        }

        public String getDesc() {
            return desc;
        }
    }
    
    /**收银台与第三方对账状态**/
    public static enum CashierAccountStatus {
        INIT(0, "未对账"), SUCCESS(1, "成功"), FAIL(2, "失败");
        private int status;

        private String desc;

        private CashierAccountStatus(int status, String desc) {
            this.status = status;
            this.desc = desc;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public int getStatus() {
            return status;
        }

        public String getDesc() {
            return desc;
        }
    }
    
    /** 对账中间符号 */
    public static enum AccountStrSpilt {
        COMMON("|");
        private String code;

        private AccountStrSpilt(String code) {
            this.code = code;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }
    }
}
